﻿<%@ Page Language="C#" MasterPageFile="~/Shared/MainPage.Master" AutoEventWireup="true" CodeBehind="RoleList.aspx.cs" Inherits="Runda.CMS.Portal.SysManage.RoleList" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content runat="server" ContentPlaceHolderID="cphHead" ID="myhead">
    <script src = "../Content/util.js" type="text/javascript"></script>
    <script src ="../Content/lookup/Lookup.js" type="text/javascript"></script>
    <script src="../Content/global.js" type="text/javascript"></script>     
    <link href="../Content/Form/form.css" rel="Stylesheet" type="text/css" />
    <link href="../Content/global.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" /> 
    <link href="../Content/Grid/Grid.css" rel="stylesheet" type="text/css" /> 
    <script src="../Content/Grid/map_grid.js" type="text/javascript" ></script>
    
    <link href="../Content/Pager.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function OpenEditRole(RoleID) {
            openMyFullWin('RoleAdd.aspx?RoleID=' + RoleID, 'editrole');
        }
        function getids() {          
             var arrTr = grid.getSelected();
             if (arrTr.length > 0) {
                 if (!confirm('确认删除此明细?')) {
                     return;
                 }
                 var ids = "";
                 for (var i = 0; i < arrTr.length; i++) {
                     if (ids != "") {
                         ids += ";";
                     } 
                     ids += arrTr[i].oid;
                 }
                 document.getElementById('<%=roleids.ClientID %>').value = ids;
                 document.getElementById('<%=lnkbtnDelete.ClientID %>').click();         
             }             
         }                 
    </script>
    </asp:Content>
    <asp:Content runat="server" ContentPlaceHolderID="cphBody" ID="Content1">
   
         <div class="Container">
         
         <table class="mnubar" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td style="padding-left: 5px" nowrap>
                        <b>角色列表</b>
                    </td>
                    <td style="padding-left: 5px">
                        <img src="../Content/Grid/separator.gif">
                    </td>
                    <td class="icMenu" nowrap>
                        <span class="menu" tabindex="0" menu="appGridMenu_mainmnu">操作<img src="../Content/Grid/mnuDown.gif">
                            <table id="appGridMenu_mainmnu" class="mnuList" cellspacing="0" cellpadding="3">
                                <colgroup>
                                    <col class="mnuLeft">
                                    <col class="mnuItm">
                                    <col align="right" width="20">
                                    <tbody>
                                        <tr tabindex="0"  action="getids();">
                                            <td>
                                            </td>
                                            <td colspan="2" nowrap>
                                                <asp:LinkButton ID="lnkbtnDelete" runat="server" onclick="lnkbtnDelete_Click">删除</asp:LinkButton><input type="hidden" runat="server" id="roleids" />
                                            </td>
                                        </tr>
                                    </tbody>
                            </table>
                        </span>
                    </td>
                    <td class="icMenu mnuRight" nowrap>
                        <span class="menu"  onclick="openMyFullWin('RoleAdd.aspx','addrole');">
                            <img class="mnuBtn" src="../Content/Grid/New_16_blue.gif"><span class="mnuBtn">新增角色</span></span>
                    </td>
                </tr>
            </tbody>
        </table>       
         
        <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
             <asp:Repeater ID="RepeaterRoles" runat="server" OnItemCommand="RepeaterRoles_ItemCommand">
                 <HeaderTemplate>
                    <table id="grid" class="grid" cellspacing="0" cellpadding="0">
            <tbody>
                <tr class="header">
                 <td align="middle" style="width:60px">
                        <div> 
                            <input type="checkbox" id="chkAll" title="选择所有记录" value="on" class="gridSort">                                                 
                            <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                    <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">角色名称</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>      
                    <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">角色描述</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                     <td align="middle"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">创建时间</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td> 
                    <td width="14">
                        <asp:ImageButton ID="imgbtnRefersh" CommandName="refersh" runat="server" ImageUrl="../Content/Grid/grid_Refresh.gif" AlternateText="刷新列表"/> 
                    </td>
                </tr>
                 </HeaderTemplate>
                 <ItemTemplate>
                  <tr class="data" onclick="handleClick()" ondblclick="OpenEditRole('<%#Eval("RoleID") %>')" oid='<%# Eval("RoleID")%>'>
                    <td></td>
                    <td><%#Eval("RoleName") %></td>
                    <td><%#Eval("RoleDesc") %></td>
                    <td><%#Eval("CreatedOn") %></td> 
                    <td></td>
                </tr>
                 </ItemTemplate>
                 <FooterTemplate>
                    </tbody>
                </table>  
                 </FooterTemplate>
             </asp:Repeater>                          
               <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator"  
                            CurrentPageButtonClass="cpb" 
                            CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条" 
                            FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" 
                            ShowCustomInfoSection="Left" Width="100%" LayoutType="Table"  
                            SubmitButtonClass="but" SubmitButtonText="转到" OnPageChanged="AspNetPager1_PageChanged">
                        </webdiyer:AspNetPager>    
         </div>
         <table class="find" id="appFind" cellSpacing="0" cellPadding="0" sys="" onquery="_Query()" ctltype="find" isnotqueryondocumentready="false" isusersetonquery="true" primarykey="" entity="" groupid="" style="display:none">
            <tr><td>
            <asp:TextBox id="__appFind_textbox"   type="text" style="width:100px" runat="server" maxlength="20"></asp:TextBox>
            </td></tr>  
                  
         </table>
</asp:Content>